package com.restaurant.application.reservation;

import com.nebutown.description.UnitDescription;
import com.nebutown.generation.basictype.UID;

/**
 * @author Administrator
 */
public class ReservationDesc extends UnitDescription {

    public static void main(String[] args) {
        getUnitDescription().run("./");
    }

    private static UnitDescription getUnitDescription() {
        UnitDescription desc = UnitDescription.basicUnit(Reservation.class, "ReservationData");
        desc.nextBean("ReservationData")
                .add("id", String.class)
                .add("createTime", Long.class)
                .add("modifyTime", Long.class)
                .add("number", String.class)
                .add("shopUid", UID.class)
                .add("shopName", String.class)
                .add("serviceName", String.class)
                .add("personAmount", Integer.class)
                .add("date", Long.class)
                .add("time", String.class)
                .add("customerId", String.class)
                .add("customerUid", UID.class)
                .add("customerName", String.class)
                .add("phone", String.class)
                .add("remarks", String.class)
                .add("state", String.class)
        ;

        desc.addUiFunction("modify", "ReservationData");
        desc.addUiFunction("refuse", null);
        desc.addUiFunction("cancel", null);
        return desc;
    }
}
